/**
 * 定义路由
 * 通过路由加载相应的模块
 */

export default function(router) {

    router.map({
        '/activity_volunteer/:activityId/success/': {
            name: 'activity_volunteer.success',
            auth: true,
            component: function(resolve) {
                require(['./page/activity_volunteer/success.vue'], resolve)
            }
        },
        '/activity_volunteer/:activityId/sign': {
            name: 'activity_volunteer.sign',
            auth: true,
            component: function(resolve) {
                require(['./page/activity_volunteer/sign.vue'], resolve)
            }
        },
        '/activity_volunteer/:activityId/': {
            name: 'activity_volunteer.detail',
            auth: true,
            component: function(resolve) {
                require(['./page/activity_volunteer/detail.vue'], resolve)
            }
        },
        '/offline/:activityId/': {
            name: 'offline.detail',
            auth: true,
            component: function(resolve) {
                require(['./page/offline/detail.vue'], resolve)
            }
        },
        '/activity/:activityId/': {
            name: 'activity.detail',
            auth: true,
            component: function(resolve) {
                require(['./page/activity/detail.vue'], resolve)
            }
        },
        '/activity/affirm/': {
            name: 'activity.affirm',
            auth: true,
            component: function(resolve) {
                require(['./page/activity/affirm.vue'], resolve)
            }
        },
        '/activity/successful/': {
            name: 'activity.successful',
            auth: true,
            component: function(resolve) {
                require(['./page/activity/successful.vue'], resolve)
            }
        },
        '/mine/writing/': {
            name: 'mine.writing',
            auth: true,
            component: function(resolve) {
                require(['./page/mine/writing.vue'], resolve)
            }
        },
        '/mine/course/': {
            name: 'mine.course',
            auth: true,
            component: function(resolve) {
                require(['./page/mine/course.vue'], resolve)
            }
        },
        '/introduce/detail/': {
            name: 'introduce.detail',
            auth: true,
            component: function(resolve) {
                require(['./page/introduce/detail.vue'], resolve)
            }
        },
        '/introduce/main/': {
            name: 'introduce.main',
            auth: true,
            component: function(resolve) {
                require(['./page/introduce/main.vue'], resolve)
            }
        },
        '/answer/': {
            name: 'answer',
            auth: true,
            component: function(resolve) {
                require(['./page/answer.vue'], resolve)
            }
        },
        '/qq_service/': {
            name: 'qq_service',
            auth: true,
            component: function(resolve) {
                require(['./page/qq_service.vue'], resolve)
            }
        },
        '/stories': {
            name: 'stories',
            auth: true,
            component: function(resolve) {
                require(['./page/stories.vue'], resolve)
            }
        },
        '/story/story_detail/': {
            name: 'story.detail',
            auth: true,
            component: function(resolve) {
                require(['./page/story_detail.vue'], resolve)
            }
        },
        '/dynamic/list/': {
            name: 'dynamic.list',
            auth: true,
            component: function(resolve) {
                require(['./page/dynamic/list.vue'], resolve)
            }
        },
        '/dynamic/:dynamicId': {
            name: 'dynamic.detail',
            auth: true,
            component: function(resolve) {
                require(['./page/dynamic/detail.vue'], resolve)
            }
        },
        '*': {
            name: '404',
            component: function(resolve) {
                require(['./page/404.vue'], resolve)
            }
        },
        'clear': {
            name: 'clear',
            component(resolve) {
                require(['./page/clear.vue'], resolve)
            }
        }
    });

}
